package com.wicket.okrcomponent.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import com.wicket.okrcomponent.biz.service.OssService;
import com.wicket.okrcomponent.biz.service.dto.req.*;
import com.wicket.okrcomponent.biz.service.dto.res.*;
import com.wicket.okrcomponent.common.ro.OkrResult;
import com.wicket.okrcomponent.common.util.CommonFunctionHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/comp/oss/")
public class OssController {

  @Autowired
  OssService ossService;
/**
   * D2查询对象存储临时令牌详情(公共)
   */
    @PostMapping("queryObjectStorageTemporaryCredentialsDetailCom")
    public OkrResult<QueryObjectStorageTemporaryCredentialsDetailComRespDto> queryObjectStorageTemporaryCredentialsDetailCom(@RequestBody @Validated QueryObjectStorageTemporaryCredentialsDetailComReqDto reqDTO){
    return OkrResult.success(ossService.queryObjectStorageTemporaryCredentialsDetailCom(reqDTO));
    }
/**
   * D2查询对象存储Redis临时令牌详情(公共)
   */
    @PostMapping("queryObjectStorageRedisTemporaryTokenDetailCom")
    public OkrResult<QueryObjectStorageRedisTemporaryTokenDetailComRespDto> queryObjectStorageRedisTemporaryTokenDetailCom(@RequestBody @Validated QueryObjectStorageRedisTemporaryTokenDetailComReqDto reqDTO){
    return OkrResult.success(ossService.queryObjectStorageRedisTemporaryTokenDetailCom(reqDTO));
    }
/**
   * D2查询MINIO临时令牌详情(公共)
   */
    @PostMapping("queryMinioTemporaryCredentialsDetailCom")
    public OkrResult<QueryMinioTemporaryCredentialsDetailComRespDto> queryMinioTemporaryCredentialsDetailCom(@RequestBody @Validated QueryMinioTemporaryCredentialsDetailComReqDto reqDTO){
    return OkrResult.success(ossService.queryMinioTemporaryCredentialsDetailCom(reqDTO));
    }
/**
   * D2查询MINIOURL临时令牌详情(公共)
   */
    @PostMapping("queryMinoUrlTemporaryCredentialsDetailCom")
    public OkrResult<QueryMinoUrlTemporaryCredentialsDetailComRespDto> queryMinoUrlTemporaryCredentialsDetailCom(@RequestBody @Validated QueryMinoUrlTemporaryCredentialsDetailComReqDto reqDTO){
    return OkrResult.success(ossService.queryMinoUrlTemporaryCredentialsDetailCom(reqDTO));
    }
/**
   * D2新增阿里云临时令牌(redis)(公共)
   */
    @PostMapping("addAliTemporaryCredentialsCom")
    public OkrResult<AddAliTemporaryCredentialsComRespDto> addAliTemporaryCredentialsCom(@RequestBody @Validated AddAliTemporaryCredentialsComReqDto reqDTO){
    return OkrResult.success(ossService.addAliTemporaryCredentialsCom(reqDTO));
    }
/**
   * D2新增MINIO临时令牌或临时上传地址(redis)(公共)
   */
    @PostMapping("addMinioTemporaryCredentialsOrUrlCom")
    public OkrResult<AddMinioTemporaryCredentialsOrUrlComRespDto> addMinioTemporaryCredentialsOrUrlCom(@RequestBody @Validated AddMinioTemporaryCredentialsOrUrlComReqDto reqDTO){
    return OkrResult.success(ossService.addMinioTemporaryCredentialsOrUrlCom(reqDTO));
    }
/**
   * D2查询阿里云临时令牌详情(redis)(公共)
   */
    @PostMapping("queryAliTemporaryCredentialsFromRedisDetailCom")
    public OkrResult<QueryAliTemporaryCredentialsFromRedisDetailComRespDto> queryAliTemporaryCredentialsFromRedisDetailCom(@RequestBody @Validated QueryAliTemporaryCredentialsFromRedisDetailComReqDto reqDTO){
    return OkrResult.success(ossService.queryAliTemporaryCredentialsFromRedisDetailCom(reqDTO));
    }
/**
   * D2查询MINIO临时令牌详情(redis)(公共)
   */
    @PostMapping("queryMinioTemporaryCredentialsDetailFromRedisCom")
    public OkrResult<QueryMinioTemporaryCredentialsDetailFromRedisComRespDto> queryMinioTemporaryCredentialsDetailFromRedisCom(@RequestBody @Validated QueryMinioTemporaryCredentialsDetailFromRedisComReqDto reqDTO){
    return OkrResult.success(ossService.queryMinioTemporaryCredentialsDetailFromRedisCom(reqDTO));
    }
/**
   * D2查询对象存储临时令牌详情(公共)
   */
    @PostMapping("queryStorageTemporaryCredentialsDetailCom")
    public OkrResult<QueryStorageTemporaryCredentialsDetailComRespDto> queryStorageTemporaryCredentialsDetailCom(@RequestBody @Validated QueryStorageTemporaryCredentialsDetailComReqDto reqDTO){
    return OkrResult.success(ossService.queryStorageTemporaryCredentialsDetailCom(reqDTO));
    }
/**
   * D2接收出参(公共)
   */
    @PostMapping("queryObjectStorageConfigDetailCom")
    public OkrResult<QueryObjectStorageConfigDetailComRespDto> queryObjectStorageConfigDetailCom(@RequestBody @Validated QueryObjectStorageConfigDetailComReqDto reqDTO){
    return OkrResult.success(ossService.queryObjectStorageConfigDetailCom(reqDTO));
    }
}
